// @ts-ignore
import * as EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker.js';

import { ITypeImmutable, TypeWorker } from './typeWorker';
import { worker } from 'monaco-editor';

self.onmessage = (e: any) => {
	EditorWorker.initialize((ctx: worker.IWorkerContext, createData: ITypeImmutable) => {
		return new TypeWorker(ctx, createData);
	});
};
